<div class="content">
	<?php
	$tools = array();
	$tools[] = n_href(n_url('rbac','topIndex'),'全局权限',"class='n-href n-btn n-btn-ccc'");
	$tools[] = n_href(n_url('rbac','privateIndex'),'权限列表',"class='n-href n-btn n-btn-ccc'");
	echo n_mod('skin')->pageHead("角色列表",$tools)
	?>
	<div class="n-sep">		
	<?php
	if(!empty($data['role'])){
	foreach($data['role'] as $key=>$val){
	?>
	<dl class="n-box n-sep-bottom">
		<dt class="n-box-head">
			<span class="n-right">
				<?=n_ui(n_url('rbac','roleEdit',array('id'=>$val['id'])),'修改',"class='n-href'")?>
			</span>

			<?=$val['name']?>
		</dt>
		<dd class="n-box-body n-sep">
			<?php
			if(!empty($data['siteRole'][$val['id']])){
				foreach($data['siteRole'][$val['id']] as $key1=>$val1){
					$pstr = array();
					$privates = explode(',',$val1);
					foreach($privates as $key2=>$val2){
						if(0==$val2){
							continue;
						}
						$pstr[] = $data['private'][$val2]['name'];
					}
				?>
				<?=$key1?>:<?=empty($pstr)?'<span class="n-red">暂无权限</span>':implode(',',$pstr)?><br />
				<?php
				}
			}
			?>
			
		</dd>
	</dl>
	<?php
	}
	}
	?>
	</div>
</div>
